package com.netease.liang.ch02.mixedconfig;



import com.netease.liang.ch02.common.CompactDisc;
import com.netease.liang.ch02.common.MediaPlayer;
import org.springframework.beans.factory.annotation.Autowired;

public class CDPlayer implements MediaPlayer {
    private CompactDisc cd;

    @Autowired
    public CDPlayer(CompactDisc cd) {
        this.cd = cd;
    }

    @Override
    public void play() {
        cd.play();
    }
}
